//
// Created by yfdev on 9/16/25.
//
#include <iostream>
#include "../include/self/command.h"
#include "processor.h"

CMD_ENTRY g_commands[] = {
    {"?", true, ShowMessage, "ShowMessage", "?"},
    {"?", true, ShowVersion, "ShowVersion", "?"}
};

long ShowMessage(const char *message) {
    std::cout << "ShowMessage: " << message << std::endl;
    return 0;
}

long ShowVersion(const char *message) {
    std::cout << "ShowVersion: " << message << std::endl;
    return 0;
}

void show_command(const int index) {
    const auto command = g_commands[index].command;
    std::cout << "command: " << command << std::endl;
}

long command_func(const int index, const char *message) {
    return g_commands[index].ProcessingFunc(message);
}

CMD_ENTRY get_commands() {
    return *g_commands;
}